<?php
$this->breadcrumbs=array(
	'Professores'=>array('index'),
	'Gerenciando',
);

$this->menu=array(
	array('label'=>'Listar Professores', 'url'=>array('index')),
	array('label'=>'Criar Professor', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('cad-professor-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Professores</h1>

<?php
// echo CHtml::link('Busca Avançada','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php
//$this->renderPartial('_search',array(
//	'model'=>$model,
//)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'cad-professor-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'cod_professor',
		'nome',
		'cpf',
		'rg',
		'data_nascimento',
		'fili_pai',
		/*
		'fili_mae',
		'logradouro',
		'numero',
		'complemento',
		'bairro',
		'cidade',
		'estado',
		'cep',
		'tel_residencial',
		'tel_celular',
		'tel_comercial',
		'tel_recados',
		'e_mail',
		*/
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
